package com.foruo.learn.designmode.visitor;

/**
 * 商品抽象类
 * @author GaoYuan
 * @date 2018/11/11 上午8:38
 */
public abstract class Goods {

    /** 商品名字 */
    public String goodsName;
    /** 商品价格 */
    public int price;

    public void setGoodsName(String goodsName){
        this.goodsName = goodsName;
    }

    public void setPrice(int price){
        this.price = price;
    }

    /** 接收访问的方法 */
    public abstract void accept(Visitor visitor);

}
